﻿//-----------------------------------------------------------------------
// <copyright file="MSlwyResult.cs" company="SLWY Enterprises">
// * Copyright (C) 2017 四川商旅无忧科技有限公司 版权所有。
// * version : 1.0
// * author  : qinchaoyue
// * FileName: MSlwyResult.cs
// * history : created by qinchaoyue 2017-10-22 10:15:49
// </copyright>
//-----------------------------------------------------------------------

namespace Slwy.MVC.Models
{
    using Slwy.Mvc.Models;
    using Slwy.Utility.ConfigurManager;

    /// <summary>
    /// 服务返回信息
    /// </summary>
    public class MSlwyResult
    {
        /// <summary>
        /// 返回结果Code
        /// 1 = 正常
        /// 0 = 程序异常
        /// </summary>
        public int Code { get; set; }

        /// <summary>
        /// 返回结果描述
        /// </summary>
        public string Message { get; set; } = "请求成功。";

        /// <summary>
        /// 请求结果数据
        /// </summary>
        public object Data { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        public string Version
        {
            get
            {
                return "1.0";
                //try
                //{
                //    // return new ConfigurHalder().GetAppOptions<MServiceInfo>("ServiceInfo").Version;
                //}
                //catch
                //{
                //    return "x.x";
                //}
            }
        }
    }
}
